home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
rjs.lha
/
RJS
/
Transport
/
tests
/
dserver_fork.C
< prev
next >
Wrap
C/C++ Source or Header
|
1991-06-14
|
400b
|
24 lines
#include <iostream.h>
#include <stdio.h>
#include <osfcn.h>
#include <libc.h>
#include "RJS/Transport.h"
int main(int argc, char *argv[])
{
DECnetSocket server(140),client;
server.accept(client); // accept a client
if (fork()==0) { // child
server.close(); // don't need this anymore!
client.linger();
client.write("hello",6); // write to client
}
exit(0);
}